import { createRouter, createWebHistory} from "vue-router";
 
// 1. 配置路由
const routes: Array<any> = [
  {
    path: "/", // 默认路由展示拍卖页面
    component: () => import("../views/Auction.vue"),
  },
  {
    path: "/publish", // 发布组件
    component: () => import("../views/Publish.vue"),
 },
 {
    path: "/my", // 个人中心组件
    component: () => import("../views/My.vue"),
 }
];
// 2.返回一个 router 实列，为函数，配置 history 模式
const router = createRouter({
  history: createWebHistory(),
  routes,
});
 
// 3.导出路由   去 main.ts 注册 router.ts
export default router